#!/usr/bin/python

import os,time
import numpy
from collections import Counter
from pylab import *
import tables,scipy
from scipy import fftpack
from scipy.cluster import vq
from scipy.ndimage import morphology,filters,interpolation
from ocrolib import docproc,improc
import pyflann
import random
import tables
from multiprocessing import Pool
import fcntl
from pdb import pm

import argparse
parser = argparse.ArgumentParser( description = "Show log entries.")
parser.add_argument('input',default='patches.h5',help="data file")
args = parser.parse_args()

with tables.openFile(args.input) as db:
    names = dir(db.root._v_attrs)
    names = [name for name in names if ("LOG_" in name)]
    names.sort()

    for name in names:
        ltime = int(name[4:])
        print name,time.ctime(ltime),db.getNodeAttr(db.root,name)
